package com.shux.inventory.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.shux.inventory.biz.IRequestAsynProcessBiz;
import com.shux.inventory.biz.InventoryProductBiz;
import com.shux.inventory.entity.InventoryProduct;
import com.shux.inventory.entity.Response;
import com.shux.inventory.request.InventoryUpdateDBRequest;
import com.shux.inventory.request.Request;
/**
 * 处理更新请求
 * @author 734621
 *
 */
@Controller
public class InventoryProductUpdateController {
	private @Autowired InventoryProductBiz inventoryProductBiz;
	private @Autowired IRequestAsynProcessBiz  requestAsynProcessBiz;
	@RequestMapping("/inventoryProductUpdate")
	@ResponseBody
	public Response inventoryProductUpdate(InventoryProduct inventoryProduct) {
		Request request = new InventoryUpdateDBRequest(inventoryProduct,inventoryProductBiz);
		requestAsynProcessBiz.process(request);
		return new Response(Response.SUCCESS);
	}
}
